// components/tjcard/tjcard.js
Component({
  /**
   * 组件的属性列表
   */
  properties: {
    dataList:{
      type:null
    },
    gradeList:{
      type:null
    },
    rateList:{
      type:null
    }
  },

  /**
   * 组件的初始数据
   */
  data: {
      isTab:0,
  },
  ready(){
   
    this.setData({
      // isTab:this.properties.dataList.operationProject,
      dataList:this.properties.dataList
    })
    console.log(this.properties.rateList,'13131313',this.properties.dataList);
},
  /**
   * 组件的方法列表
   */
  methods: {
    bindtapDeviceOrder(e){
      wx.navigateTo({
        url: '/pagesB/orderlist/orderlist?id='+e.currentTarget.dataset.id,
      })
    },
    bindtapDevicestatistics(e){
      wx.navigateTo({
        url: '/pagesB/equipmentrecord/equipmentrecord?id='+e.currentTarget.dataset.id,
      })
    },
    territoryHeld(e){
      this.triggerEvent('syncterritory',{value:e.currentTarget.dataset.id})
    },
    showModal(e){
      console.log(e);
      let data = {}
      data.hospitalId = e.currentTarget.dataset.id
      data.deptId = e.currentTarget.dataset.depid
      this.triggerEvent('sync',{value:data})
    },
    diseaseHeld(e){
      console.log(e.currentTarget.dataset.id);
      this.triggerEvent('synctabinfo',{value:e.currentTarget.dataset.id})
    },
    bindtapDeviceOrg(e){
      let type = e.currentTarget.dataset.type
      let id = e.currentTarget.dataset.id
      if(type==1){
        wx.navigateTo({
          url: '/pagesB/rankinglist/organizationlist/organizationlist?id='+id,
        })
      }else if(type==2){
        wx.navigateTo({
          url: '/pagesB/rankinglist/timelist/timelist?id='+id,
        })
      }else if(type==3){
        wx.navigateTo({
          url: '/pagesB/rankinglist/equipmentlist/equipmentlist?id='+id,
        })
      }else if(type==4){
        wx.navigateTo({
          url: '/pagesB/rankinglist/curelist/curelist?id='+id,
        })
      }
      console.log(e.currentTarget.dataset.type);
    }
  }
})
